-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust/src/bwrap.rs: check for fuse version #5074
Conversation
Skipping CI for Draft Pull Request. |
build.rs
Outdated
@@ -16,6 +32,29 @@ fn detect_fedora_feature() -> Result<()> { | |||
Ok(()) | |||
} | |||
|
|||
fn detect_el9_or_older() -> Result<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not opposed to doing it this way but I think it will actually be cleaner to:
- Add a
fuse3
feature on the rust side - Change the spec file to enable it
Look at how this is done for the RHSM stuff in the spec:
%{?with_rhsm:--enable-featuresrs=rhsm}
Ugh well...I guess we'd need to concatenate it in the spec file...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh I see, yeah that makes more sense.
rust/src/bwrap.rs
Outdated
let mut fuse_command = "fusermount3"; | ||
|
||
#[cfg(feature = "el_9_or_older")] | ||
fuse_command = "fusermount"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let fuse_command = if cfg!(feature = "el_9_or_older")) { "fusermount" } else {"fusermount3" };
build.rs
Outdated
if let Some(pos) = platform_id.find("el") { | ||
let version_part = &platform_id[pos + 2..]; // Skip "el" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try using platform_id.split_once("el")
Ugh sorry there's something I just realized now too...in theory we should support other distributions and who knows how they have fuse set up. I keep circling back to...really, either of |
But to do that we need to know that we can run |
quick only compile tested function to do the dynamic probing
|
Cool, I'll update the PR then and drop the build conditional. |
7d390da
to
b2d79d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, need to fix the minor codestyle error.
We have been building with fuse but changed to fuse3 on: https://src.fedoraproject.org/rpms/rpm-ostree/c/3c602a23787fd2df873c0b18df3133c9fec4b66a However our code is just calling fuse's fusermount. We are updating our spec and code based on the discusion on: coreos#5047 Co-authored-by: Colin Walters <[email protected]>
b2d79d4
to
5641308
Compare
@jmarrero: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
@@ -122,7 +138,7 @@ impl Drop for RoFilesMount { | |||
return; | |||
}; | |||
// We need to unmount before letting the tempdir cleanup run. | |||
let success = Command::new("fusermount") | |||
let success = Command::new(get_fusermount_path().unwrap().to_string()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could factor this out into a helper that we run once at startup, that would help us avoid the unwrap() but I'm fine with this as is too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's see if this fixes CI with the spec patch and I'll do a follow up with the startup part?
I guess it would go here
Line 25 in cd6fd88
/// Validate basic assumptions on daemon startup. |
I think we need to roll this PR together with #5047 to get the FCOS CI to work |
This now is incorporated into #5047 |
We have been building with fuse but changed to fuse3 on:
https://src.fedoraproject.org/rpms/rpm-ostree/c/3c602a23787fd2df873c0b18df3133c9fec4b66a
However our code is just calling fuse's fusermount.
We are updating our spec and code based on the discusion on:
#5047
Co-authored-by: @cgwalters